const {DataTypes } = require('sequelize');
const sequelize = require('../db/sequelize')

const User = sequelize.define('user', {
  
  email: {   //邮件
    type: DataTypes.STRING,  //类型
    allowNull: false,  //必填
    primaryKey:true  //关键
  },
  username: {   //用户名
    type: DataTypes.STRING,
    allowNull: false,
    unique:true
  },
  password: {   //密码
    type: DataTypes.STRING,
    allowNull: false,
  },
  avatar: {   //头像
    type: DataTypes.TEXT,
    allowNull: true,
  },
  bio: {   //简介
    type: DataTypes.TEXT,
    allowNull: true,
  }
});


module.exports = User